/// @author:  JoeKai
/// @date 2022/6/26 13:22
/// @explain： 

// ignore: camel_case_types
class HomeProductModel {
  List<ListItem>? list;

  HomeProductModel({this.list});

  HomeProductModel.fromJson(Map<String, dynamic> json) {
    if (json['list'] != null) {
      list = <ListItem>[];
      json['list'].forEach((v) {
        list!.add(new ListItem.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.list != null) {
      data['list'] = this.list!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class ListItem {
  int? id;
  String? storeName;
  String? cateId;
  String? image;
  String? sales;
  String? price;
  int? stock;
  String? otPrice;
  int? specType;
  String? recommendImage;
  String? unitName;
  int? isVip;
  int? vipPrice;
  int? isVirtual;
  int? presale;
  String? customForm;
  int? virtualType;
  String? description;
  int? cartButton;
  bool? checkCoupon;

  ListItem(
      {this.id,
        this.storeName,
        this.cateId,
        this.image,
        this.sales,
        this.price,
        this.stock,
        this.otPrice,
        this.specType,
        this.recommendImage,
        this.unitName,
        this.isVip,
        this.vipPrice,
        this.isVirtual,
        this.presale,
        this.customForm,
        this.virtualType,
        this.description,
        this.cartButton,
        this.checkCoupon});

  ListItem.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    storeName = json['store_name'];
    cateId = json['cate_id'];
    image = json['image'];
    sales = json['sales'];
    price = json['price'];
    stock = json['stock'];
    otPrice = json['ot_price'];
    specType = json['spec_type'];
    recommendImage = json['recommend_image'];
    unitName = json['unit_name'];
    isVip = json['is_vip'];
    vipPrice = json['vip_price'];
    isVirtual = json['is_virtual'];
    presale = json['presale'];
    customForm = json['custom_form'];
    virtualType = json['virtual_type'];
    description = json['description'];

    cartButton = json['cart_button'];
    checkCoupon = json['checkCoupon'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['store_name'] = this.storeName;
    data['cate_id'] = this.cateId;
    data['image'] = this.image;
    data['sales'] = this.sales;
    data['price'] = this.price;
    data['stock'] = this.stock;
    data['ot_price'] = this.otPrice;
    data['spec_type'] = this.specType;
    data['recommend_image'] = this.recommendImage;
    data['unit_name'] = this.unitName;
    data['is_vip'] = this.isVip;
    data['vip_price'] = this.vipPrice;
    data['is_virtual'] = this.isVirtual;
    data['presale'] = this.presale;
    data['custom_form'] = this.customForm;
    data['virtual_type'] = this.virtualType;
    data['description'] = this.description;
    data['cart_button'] = this.cartButton;
    data['checkCoupon'] = this.checkCoupon;
    return data;
  }
}